//package com.atguigu.gulimall.product.config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.converter.HttpMessageConverter;
//import org.springframework.http.converter.StringHttpMessageConverter;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
//
//import java.nio.charset.StandardCharsets;
//import java.util.List;
//
///**
// * @author zhuguanming
// * @date 2021/4/19
// */
//@Configuration
//public class WebConfig extends WebMvcConfigurationSupport {
//
//    @Override
//    protected void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
//        converters.stream().filter(StringHttpMessageConverter.class::isInstance).map(c -> (StringHttpMessageConverter) c).forEach(c -> c.setDefaultCharset(StandardCharsets.UTF_8));
//    }
//}
